﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<card title="使用回城卷" ontimer="index.asp?cc=<%=cc%>&amp;ve=<%=ve%>">
<timer value="10"/>
<p>
<%
dim myid
myid=qingtian.nid
wpid=request("wpid")

if wpid="hcj" then
yname="回城卷"
end if

Server.ScriptTimeout=999
set rs=Server.CreateObject("ADODB.Recordset")
strSQL="select * from sx where cstr(ids)="&myid
rs.open strSQL,liao,1,1
if rs.recordcount<=1 then
if rs("tl")<1 then
sql="delete from pk Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
sql="delete from kywap Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
sql="delete from luo Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
msg="GAME-OVER!<br/>您被怪物杀害了需重新复活才能继续游戏！<br/><a href='yp.asp?cc="&cc&"&amp;ve="&ve&"'>使用药品复活</a><br/>"
else
set rs=Server.CreateObject("ADODB.Recordset")
strsQL="select "&wpid&" from wupin where cstr(ids)='"&myid& "'"
rs.open strsQL,liao,1,1
if rs(""&wpid&"")<1 then
msg="您的包袱里没有回城卷<br/>"
else
sql="delete from luo Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
sql="delete from kywap Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
sql="delete from pk Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
sql="update wupin set "&wpid&"="&wpid&"-1 where cstr(ids)="&myid
  liao.Execute(sql)
msg="成功使用"&yname&"<br/>"
end if
end if
end if
Response.Write ""&msg&"=========<br/>"
 rs.Close
	Set rs=Nothing
%>
<a href="index.asp?cc=<%=cc%>&amp;ve=<%=ve%>">江湖首页</a><br/>
<%qingtian.shuchu%>